package com.tian.service.impl;

import com.tian.dto.NotifyResultDto;
import com.tian.dto.PayNotifyTestReqDto;
import com.tian.exception.BusinessException;
import com.tian.service.NotifyPayService;
import com.tian.service.PayBaseService;
import com.tian.service.PaymentService;
import com.tian.strategy.PaymentStrategy;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * {@code @description:} TODO
 *
 * @author tianwc 公众号：Java后端技术全栈
 * 在线刷题 1200+java面试题和1000+篇技术文章：<a href="https://woaijava.cc/">博客地址</a>
 * {@code @date:} 2025-01-20 10:12
 * {@code @version:} 1.0
 */
@Service
public class NotifyPayServiceImpl implements NotifyPayService {
    @Override
    public ResponseEntity<String> payNotify(HttpServletRequest request, PayNotifyTestReqDto payNotifyTestReqDto,int channelId) {
        PaymentService paymentService = PaymentStrategy.getPaymentService(channelId);
        return paymentService.payNotify(request, payNotifyTestReqDto);
    }
}
